// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** 此处后端没有提供注释 POST /generatePPT/check/progress */
export async function checkProgress(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.checkProgressParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseString>('/generatePPT/check/progress', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /generatePPT/check/progress/async */
export async function checkProgressAsync(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.checkProgressAsyncParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseString>('/generatePPT/check/progress/async', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /generatePPT/check/progress/immediately */
export async function checkProgressImmediately(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.CheckProgressImmediatelyParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseCheckProgressVO>('/generatePPT/check/progress/immediately', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /generateTeach/upload */
export async function generatePptOutlineByUploadFile(file:File, options?: { [key: string]: any }) {
// 使用 FormData 构建请求体
  const formData = new FormData();
  formData.append('file', file); // 将文件添加到 FormData

  return request<API.BaseResponseLong>('/generatePPT/generate/file', {
    method: 'POST',
    data: formData,
    ...(options || {}),
  })
}
/** 此处后端没有提供注释 POST /generatePPT/generate/file_url */
export async function generatePptOutlineByFileUrl(
  body: API.GeneratePPTRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong>('/generatePPT/generate/file_url', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /generatePPT/generate/ppt */
export async function generatePpt(
  body: API.GeneratePPTAddRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseString>('/generatePPT/generate/ppt', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /generatePPT/generate/query */
export async function generatePptOutlineByUploadOutline(
  body: API.GeneratePPTRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong>('/generatePPT/generate/query', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /generatePPT/list/page/vo */
export async function listGeneratePptVoByPage(
  body: API.GeneratePptQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageGeneratePptVO>('/generatePPT/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /generatePPT/list/template */
export async function getTemplateList(
  body: API.ThemeTemplateQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseTemplateVOWithDetailImage>('/generatePPT/list/template', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
